projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c155dfe
)
efi_selftest: avoid dereferencing NULL in tpl test
author
Heinrich Schuchardt
<
[email protected]
>
Sun, 8 Oct 2017 04:57:25 +0000
(06:57 +0200)
committer
Alexander Graf
<
[email protected]
>
Mon, 9 Oct 2017 05:00:37 +0000
(07:00 +0200)
The task priority levels test uses two events one passes the
notification counter as context. The other passes NULL.
Both use the same notification function. So we need to check
for NULL here.
Signed-off-by: Heinrich Schuchardt <
[email protected]
>
Reviewed-by: Simon Glass <
[email protected]
>
Signed-off-by: Alexander Graf <
[email protected]
>
lib/efi_selftest/efi_selftest_tpl.c
patch
|
blob
|
history
diff --git
a/lib/efi_selftest/efi_selftest_tpl.c
b/lib/efi_selftest/efi_selftest_tpl.c
index 0b78ee759568b7e90b5a32ce449dc412d88b76eb..b8c0e70262dbe196068f688a53052b84f952e21b 100644
(file)
--- a/
lib/efi_selftest/efi_selftest_tpl.c
+++ b/
lib/efi_selftest/efi_selftest_tpl.c
@@
-26,7
+26,8
@@
static void EFIAPI notify(struct efi_event *event, void *context)
{
unsigned int *count = context;
- ++*count;
+ if (count)
+ ++*count;
}
/*